export default defineNuxtRouteMiddleware((to, from) => {
  const userInfoCookie = useCookie('userInfo')
  if (!userInfoCookie.value) {
    if (['personal', 'registershop', 'order', 'handleshop', 'handleorders', 'feedback'].includes(to.name as string))
      return navigateTo('/login')
  }
  useHead({ title: useZhName(to.name as string) + ' | 疯味网点餐' })  
})
